// 章节
export default class UnitItemModel {
	constructor(param) {
		const {
			id,
			title,
			avatar,
			summary,
			content,
			categoryName,
			categoryId,
			englishTitle,
			englishContent,
			vocabulary,
			memberFlag,
			lessonIndex,
			index,
		} = param || {}
		this.id = id;
		this.title = title;
		this.avatar = avatar;
		this.summary = summary;
		this.content = content;
		this.englishTitle = englishTitle;
		this.englishContent = englishContent;
		this.categoryId = categoryId;
		this.categoryName = categoryName;
		this.vocabulary = vocabulary ? vocabulary : 0;
		this.lessonIndex = lessonIndex;
		this.index = index;
		this.memberFlag = memberFlag;
		this.promise = memberFlag || (lessonIndex === 0 && index === 0); // 课程会员或者第一课程第一章节可读
	}

}